package com.yunshang.shoppingmall.mapper;

import com.yunshang.shoppingmall.entity.SearchHistory;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SearchHistoryMapper {

    int deleteByPrimaryKey(Integer shId);
    //增加历史记录
    int insert(SearchHistory searchHistory);

    int insertSelective(SearchHistory record);

    SearchHistory selectByPrimaryKey(Integer shId);

    int updateByPrimaryKeySelective(SearchHistory record);

    int updateByPrimaryKey(SearchHistory record);

    //根据用户id 查询历史记录
    List<SearchHistory> selectSearchHistoryByUserId(int userId);

    //根据用户Id删除搜索记录
    int deleteSearchHistoryByUserId(int userId);
}